﻿using System;
using WMPLib;

namespace Zipun.VkOnlineMusic.Logic
{
    public class PlayStateChangedEventArgs : EventArgs
    {
        public PlayState NewState { get; private set; }

        public PlayStateChangedEventArgs(PlayState newState)
        {
            NewState = newState;
        }

        public PlayStateChangedEventArgs(int newState)
        {
            NewState = PlayState.None;
            switch (newState)
            {
                case (int)WMPPlayState.wmppsPlaying:
                    NewState = PlayState.Playing;
                    break;
                case (int)WMPPlayState.wmppsPaused:
                    NewState = PlayState.Paused;
                    break;
                case (int)WMPPlayState.wmppsStopped:
                    NewState = PlayState.Stopped;
                    break;
            }
        }
    }
}